bitkeeper revision 1.1159.1.69 (4120808b8wy9kCiirenw5U48ZbJlFA)
authormjw@wray-m-3.hpl.hp.com <mjw@wray-m-3.hpl.hp.com>
Mon, 16 Aug 2004 09:38:19 +0000 (09:38 +0000)
committermjw@wray-m-3.hpl.hp.com <mjw@wray-m-3.hpl.hp.com>
Mon, 16 Aug 2004 09:38:19 +0000 (09:38 +0000)
Add default value for cpu_weight.

tools/python/xen/xend/XendDomainInfo.py

index dedbcb9537a04d1191b2c7edd2f264a134b8174c..8b47598c935694b1ec6695c52395dc9c6f71e479 100644 (file)
@@ -499,7 +499,7 @@ class XendDomainInfo:
         try:
             self.name = sxp.child_value(config, 'name')
             self.check_name(self.name)
-           self.cpu_weight = float(sxp.child_value(config, 'cpu_weight'))
+           self.cpu_weight = float(sxp.child_value(config, 'cpu_weight', '1'))
             if self.restore and self.dom:
                 xc.domain_setname(self.dom, self.name)
             self.memory = int(sxp.child_value(config, 'memory'))